const {sequelize, DataTypes} = require("../config/Sequelize");

const rapid_upload = sequelize.define("upload", {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,//主键值
        autoIncrement: true,//自增字段
        comment: 'file 自增id',
        field: 'rapid_file_id',
    },
    uuid: {
        type: DataTypes.UUID,
        field: 'rapid_file_uuid'
    },
    filename: {
        type: DataTypes.STRING(200),
        comment: '文件名',
        field: 'rapid_file_name',
    },
    fileOgname: {
        type: DataTypes.STRING(200),
        comment: '原文件名',
        field: 'rapid_file_Og_name',
    },
    filetype: {
        type: DataTypes.STRING(20),
        comment: '文件类型',
        field: 'rapid_file_type',
    },
    filemimetype: {
        type: DataTypes.STRING(200),
        comment: '文件mime类型',
        field: 'rapid_file_mimetype',
    },
    filesize: {
        type: DataTypes.STRING(50),
        comment: '文件大小',
        field: 'rapid_file_size',
    }, filepath: {
        type: DataTypes.STRING(500),
        comment: '文件路径',
        field: 'rapid_file_path',
    }
}, {
    tableName: 'rapid_upload',
    timestamps: true,
});

module.exports = rapid_upload
